package example;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext context=new ClassPathXmlApplicationContext("application.xml");
        Student student=context.getBean(Student.class);
        student.setName("zhangsan");
        System.out.println(student.getName());
        UserDao userDao=context.getBean(UserDao.class);
        userDao.getUserByID();
    }
}